﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IceTea.Domain.Models;

namespace IceTea.Domain
{
    public class LogFactory
    {
        public static int AddErrorLog(ErrorLog errorLog)
        {
            using (IceTeaEntities ite = new IceTeaEntities())
            {
                errorLog.LogTime = DateTime.Now;
                ite.ErrorLog.AddObject(errorLog);
               
                ite.SaveChanges();
            }
            return errorLog.Id;
        }
    }
}
